home *** CD-ROM | disk | FTP | other *** search
- % macros for verbatim scanning
- % im wesentlichen dem file MANHDR TEX von DEK entnommen
- \catcode`@=11
- \def\tt{\fam\ttfam\tentt}%
- \newskip\ttglue \ttglue=.5em plus .25em minus .15em
- \chardef\other=12
- \def\ttverbatim{\begingroup
- \catcode`\\=\other
- \catcode`\{=\other
- \catcode`\}=\other
- \catcode`\$=\other
- \catcode`\&=\other
- \catcode`\#=\other
- \catcode`\%=\other
- \catcode`\~=\other
- \catcode`\_=\other
- \catcode`\^=\other
- \catcode`\"=\other
- \parskip \z@
- \obeyspaces \obeylines \tt}
-
- \def\begintt{$$\let\par=\endgraf \ttverbatim
- \catcode`\|=0 \rightskip-5pc \ttfinish}
- {\catcode`\|=0 |catcode`|\=\other % | is temporary escape character
- |obeylines % end of line is active
- |gdef|ttfinish#1^^M#2\endtt{|vbox{#2}|endgroup$$}}
-
- \catcode`\|=\active
- {\obeylines \gdef|{\ttverbatim \spaceskip\ttglue \let^^M=\ \let|=\endgroup}}
- %\def\ttspace{{\tt\hskip\ttglue}}
-
- \def\vrt{\hbox{\tt\char`\|}} % vertical line
- \def\dn{\hbox{\tt\char'14}} % downward arrow
- \def\up{\hbox{\tt\char'13}} % upward arrow
- \def\]{\hbox{\tt\char`\ }} % visible space
-
- \catcode`@=12 % at signs are no longer letters
- \def\verbatimon{\catcode`\|=\active}
- \def\verbatimoff{\catcode`\|=\other}
- \verbatimoff
-